package com.xhui.vimarket.zkplus.zul.attr.ada;

import org.zkoss.zk.ui.Component;

import com.xhui.vimarket.zkplus.zul.attr.bean.AttrTmpl;


/**
 * 控件展示适配规则定义.
 * 
 * @author wuyx
 * @version Revision 1.0.0
 * 
 */
public interface AttrAda {
    
    /**
     * 是否生成空的定义值.
     * @param displayMode String
     * @param attrTmpl AttrTmpl
     * @return boolean
     */
    boolean isCreateNullAttrInst(String displayMode, AttrTmpl attrTmpl);
    
    /**
     * 获取适配的控件模板.
     * @param displayMode String
     * @param attrTmpl AttrTmpl
     * @param sComposer String
     * @param param1 String
     * @param param2 String
     * @param parentComp Component
     * @return String
     */
    Component getAttrTmplCompStr(String displayMode, AttrTmpl attrTmpl, String sComposer,
        String param1, String param2, Component parentComp);
    
    /**
     * 获取menu控件模板.
     * @param displayMode String
     * @param attrTmpl AttrTmpl
     * @param sComposer String
     * @param param1 String
     * @param param2 String
     * @param parentComp Component
     * @return String
     */
    Component getAttrMenuCompStr(String displayMode, AttrTmpl attrTmpl, String sComposer,
        String param1, String param2, Component parentComp);
    
    /**
     * 获取密码控件模板.
     * @param displayMode String
     * @param attrTmpl AttrTmpl
     * @param sComposer String
     * @param param1 String
     * @param param2 String
     * @param parentComp Component
     * @return String
     */
    Component getAttrPasswordTextbox2Str(String displayMode, AttrTmpl attrTmpl, String sComposer,
        String param1, String param2, Component parentComp);
    
    /**
     * 获取重置控件模板.
     * @param displayMode String
     * @param attrTmpl AttrTmpl
     * @param sComposer String
     * @param param1 String
     * @param param2 String
     * @param parentComp Component
     * @return String
     */
    Component getAttrResetStr(String displayMode, AttrTmpl attrTmpl, String sComposer, String param1,
        String param2, Component parentComp);
    	
    /**
     * 是否显示清空按钮.
     * 
     * @param displayMode String
     * @param attrTmpl AttrTmpl
     * @param sComposer String
     * @param param1 String
     * @param param2 String
     * @return String
     */
    String isDispReset(String displayMode, AttrTmpl attrTmpl, String sComposer, String param1,
        String param2);
    
    /**
     * 设置是否配置预览.
     * 
     * @param settingPreview boolean
     * @author wuyx
     * 2011-3-3 wuyx 
     */
    void setSettingPreview(boolean settingPreview);
    
    /**
     * 是否配置预览模式.
     * 
     * @return boolean
     * @author wuyx
     * 2011-3-3 wuyx 
     */
    boolean isSettingPreview();
    
    /**
     * 是否生成公用的信息栏.
     * 
     * @return boolean
     * @author wuyx
     * 2011-3-3 wuyx 
     */
    boolean isDispRulebar();
    
    /**
     * 界面布局方式.
     * 0.根据子控件的X，Y进行布局
     * 1.顺序自动布局，依据上级行，列为准
     * 
     * @return int
     * @author wuyx
     * 2011-3-3 wuyx 
     */
    int getSortType();
    
    /**
     * 是否是展示模式.
     * 
     * @return boolean
     * @author wuyx
     * 2011-5-31 wuyx 
     */
    boolean isViewMode();
    
}
